<template>
	<page-meta :root-font-size="`${fontSize}px`"></page-meta>
    <view class="peopleMsg">
        <view v-if="msg.current">
            <view>在职年份：{{ msg.current.jobYear }}年</view>
            <view>在职时间：{{ msg.current.jobStartTime }}--{{ msg.current.jobEndTime }}</view>
        </view>
        <view v-if="msg.historyList">
            <view v-for="(item,i) in msg.historyList" :key="i">
                <view>往期年份：{{ item.jobYear }}年</view>
                <view>往期时间：{{ item.jobStartTime }}--{{ item.jobEndTime }}</view>
            </view>
        </view>
        <view v-html="msg.snapshot"></view>
    </view>
</template>
<script>
import { mapState } from 'vuex'
export default {
    computed: {
		...mapState(['fontSize'])
	},
    data() {
        return {
            id: "",
            msg: {}
        }
    },
    onLoad(options) {
        this.id = options.id;
        this.getList(options.id)
    },
    methods: {
        getList(id) {
            this.$http2.post('ywh/candidate/info', { id: Number(id) }).then(res => {
                if (res.code === 10000) {
                    this.msg = res.data.info;
                }
            })
        }
    }
}
</script>

<style lang="scss">
.peopleMsg {
    padding: 5%;
}
</style>
